package com.ydd.mapper;

import com.ydd.entity.Advimg;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ydd.vo.AdvimgVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

import java.util.List;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author hgz
 * @since 2023-05-30
 */
@Mapper
public interface AdvimgMapper extends BaseMapper<Advimg> {

    @Select("select count(*) from ydd_advimg")
    Integer getCount();
    @Select("select * from ydd_advimg where advimgpos = #{advimgpos}")
    List<Advimg> findByAdvposId(int advimgpos);


    @Select("select count(*) from ydd_advimg where advimgpos = #{advimgpos};")
    Integer countById(String advimgpos);

    //AdvimgVO getNameById(int advimgposId);

    @Select("select id,advimgpos,advimgsrc,advimgdesc,advimglink,default_data" +
            " from ydd_advimg where advimgpos =#{advimgpos};")
    Advimg selectId(String advimgpos);
}
